home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 22 / macformat_22.iso / Shareware / Programación / The Gray Council 1.1 / projects / PowerPlant / MyApplication.h < prev    next >
Encoding:
Text File  |  1996-08-04  |  1.7 KB  |  58 lines  |  [TEXT/CWIE]

  1. //
  2. // GrayCouncil
  3. // Copyright ©1996 by Trygve Isaacson. All Rights Reserved.
  4. //
  5. // This file contains the GrayCouncil PowerPlant test program's
  6. // application class implementation.
  7. //
  8.  
  9. #pragma once
  10.  
  11. #include <LApplication.h>
  12.  
  13. #include "GrayCouncilPP.h"
  14.  
  15. class MyApplication : public LApplication, LListener, LPeriodical
  16.     {
  17.     public:
  18.         
  19.         MyApplication();
  20.         virtual ~MyApplication();
  21.         
  22.             // this overriding function performs application functions
  23.             
  24.         virtual Boolean        ObeyCommand(CommandT inCommand, void* ioParam);    
  25.         
  26.             // this overriding function returns the status of menu items
  27.             
  28.         virtual void        FindCommandStatus(CommandT inCommand,
  29.                                 Boolean &outEnabled, Boolean &outUsesMark,
  30.                                 Char16 &outMark, Str255 outName);
  31.  
  32.     virtual void    ListenToMessage(
  33.                             MessageT        inMessage,
  34.                             void            *ioParam);
  35.  
  36.         virtual void    SpendTime(const EventRecord &inMacEvent);
  37.  
  38.     protected:
  39.  
  40.         virtual void        StartUp();        // overriding startup functions
  41.  
  42.         void    PoseExampleDialog(UInt32 dialogIndex);
  43.         void    SetupExampleDialog(UInt32 dialogIndex, LWindow* itsWindow);
  44.         void    CleanupExampleDialog(UInt32 dialogIndex, LWindow* itsWindow);
  45.         void    EnableDisableDialog(UInt32 dialogIndex, LWindow* itsWindow, Boolean enable);
  46.         void    ToggleButtons(OSType buttonToDisable, OSType buttonToEnable);
  47.         void    EnableDisablePane(OSType paneID, Boolean enable);
  48.  
  49.         UInt32        mCurrentDialogIndex;
  50.         LWindow*    mCurrentDialog;
  51.  
  52.         AGAProgressIndicatorPP*    mProgressIndicator1;    // valid while it is idling
  53.         AGAProgressIndicatorPP*    mProgressIndicator2;    // valid while it is idling
  54.         Boolean                    mMovingProgressOrigin;    // true if ind. 2 has moving origin
  55.         Boolean                    mSkipNext;                // toggle to make origin move slower than value
  56.     };
  57.  
  58.